package com.hdax.dm.api.scheduler.controller;

import com.hdax.dm.api.scheduler.SchedulerSeatControllerApi;
import com.hdax.dm.entity.scheduler.SchedulerSeat;
import com.hdax.dm.service.SchedulerSeatPService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SchedulerSeatPController implements SchedulerSeatControllerApi {

    @Autowired
    private SchedulerSeatPService scheduleSeatPService;

    @Override
    public List<SchedulerSeat> getScheduleSeatList(Long scheduleId) {
        List<SchedulerSeat> scheduleSeatList = scheduleSeatPService.getScheduleSeatList(scheduleId);
        return scheduleSeatList;
    }

    @Override
    public boolean updateSeatStatus(SchedulerSeat schedulerSeat) {
        return scheduleSeatPService.updateSeatStatus(schedulerSeat);
    }

    @Override
    public Long getScheduleSeatById(Long id) {
        return scheduleSeatPService.getScheduleSeatById(id);
    }

    @Override
    public List<SchedulerSeat> findSchedulerSeatByOrderNo(String orderNo) {
        return scheduleSeatPService.findSchedulerSeatByOrderNo(orderNo);
    }

    @Override
    public boolean updateSeatStatusSuccess(String orderNo, Integer type) {
        return scheduleSeatPService.updateSeatStatusSuccess(orderNo,type);
    }
}
